/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;

import Model.TradProd;
import org.hibernate.Session;
import org.hibernate.SessionFactory;

/**
 *
 * @author Anthares
 */
public class TradProdManager extends BaseManager {
    public TradProdManager(SessionFactory factory, String locale) {
        super(factory, locale);
    }

    public TradProd getTradProdById(int id) {
        Session ses = factory.openSession();
        TradProd trad = (TradProd) ses.getNamedQuery("TradProd.findById").setInteger("prodId", id).setString("langId", locale).uniqueResult();
        ses.close();
        return trad;
    }
}
